package com.pay.common.resp;

import lombok.Data;

/**
 * 通用返回对象
 * @param <T>
 */
@Data
public class Response<T> {

    private int code;

    private String msg;

    private T data;

    /**
     * 失败返回
     * @param msg
     * @return
     */
    public static Response returnFail(String msg){

        Response response = new Response();
        response.setCode(-1);
        response.setMsg(msg);
        return response;
    }
}
